package com.blb.service;

import com.blb.entity.Order;
import com.blb.entity.OrderLog;
import com.blb.entity.ProcurementOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blb.entity.Sort;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author tb
 * @since 2020-05-20
 */
public interface IProcurementOrderService extends IService<ProcurementOrder> {

    /**
     * 未下单商品分类树形
     */
    public List<Sort> sortTree(@Param("id") String id);
    /**
     * 根据条件查询采购订单信息
     */
    public List<ProcurementOrder> getProcurementOrder(String id, Integer start, Integer length, String pname, String status, Boolean zjdd, String cid);

    /**
     * 查询采购订单总条数
     */
    public int getProcurementOrderCount(String pname, String status, Boolean zjdd, String cid);

    /**
     * 未下单的商品信息
     */
    public List<ProcurementOrder> orderProduct(String id, Integer start, Integer length, String sid, Integer sortType, String cid);

    public int orderProductCount(String sid, Integer sortType, String cid);

    /**
     * 购买商品
     */
    public boolean buyProduct(Order o, String no, OrderLog orderLog);

    /**
     * 多件购买
     */
    public boolean buyProducts(Order o, String[] nos, List<OrderLog> list, Date date);

    /**
     * 签收商品
     */
    public boolean takeProduct(Order o, String orderId, OrderLog orderLog);

}
